<template>
    <div>
        <h4>弟</h4>
        <h4>玩具:{{computer}}</h4>
    </div>
</template>

<script setup lang="ts">
import emitter from '@/utils/mitter'
import { onUnmounted, ref } from 'vue';
emitter.on('send-toy',(value:string) => { 
    computer.value = value})
let computer = ref('奥特曼')
onUnmounted(() => { 
    emitter.off('send-toy')
 })
</script>

<style scoped>

</style>